home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / FLEXFILE.ARJ / FLEXINFO.EXE / BRIEF.TXT next >
Text File  |  1991-10-22  |  6KB  |  133 lines

  1.                      FlexFile Documentation Disk
  2.                         Ganahl Software, Inc.
  3.                          Copyright (c) 1991
  4.  
  5.  
  6. This file is included as an introduction to FlexFile.  If you prefer a more
  7. in-depth discussion of the workings of FlexFile, or if you want examples of
  8. functions that are included with FlexFile, you will want to read the
  9. documentation file (FlexFile.doc) or view the Norton Guides database
  10. (FlexFile.ng).
  11.  
  12.  
  13.  
  14. FlexFile's primary purpose is to eliminate the problems associated with
  15. Clipper's memo fields while retaining their ease of use.  In addition,
  16. FlexFile can save arrays to its improved version of a "memo-field" (even
  17. Clipper 5.0 nested arrays).
  18.  
  19.    FlexFile addresses the four major problems that plague Clipper's
  20.    memo-fields:
  21.    
  22.    First, FlexFile reuses all unused space.  If your user edits a memo (or
  23.    deletes elements of an array) making it smaller, FlexFile is aware of
  24.    every byte of the excess space and will use it later for new data.  This
  25.    feature totally eliminates the file bloat which is so characteristic of
  26.    Clipper's DBT files.
  27.  
  28.    Second, FlexFile does not allocate space in blocks.  Instead, each item
  29.    stored requires only the space for its own length plus a six byte header
  30.    that FlexFile uses for management.  This is in great contrast to
  31.    Clipper's memo-fields which require a fixed block size of 512 bytes.
  32.  
  33.    Third, FlexFile's file size is limited only by your disk space.
  34.  
  35.    Finally, FlexFile can store any valid Clipper data.  This includes
  36.    arrays, character strings, dates, numerics, and logicals.  In addition,
  37.    the content of character data is not limited.  It is, therefore,
  38.    possible to store SAVESCREEN() variables or any other binary data that
  39.    you use.
  40.  
  41. The savings associated with FlexFile's use depend largely on what data is
  42. being saved.  For example, the smaller the average size of your data the
  43. larger percent savings FlexFile will realize over a "packed" DBT file (i.e.
  44. a DBT file that has not undergone any REPLACEs or DELETEs).
  45.  
  46. Once you begin to REPLACE or DELETE data, the opposite becomes true and the
  47. savings are greater for larger data items.
  48.  
  49.  
  50.  
  51.  
  52. FLEXFILE'S ADVANCED FEATURES
  53.  
  54.  
  55. Introduction
  56.  
  57. FlexFile's primary function is to replace Clipper's memo-field/DBT system
  58. with a simple and efficient Variable Length Field engine. However, FlexFile
  59. not only relieves the programmer of the excruciating limitations imposed by
  60. Clipper's memo-fields, but also adds significant flexibility to the DBF
  61. file format without sacrificing simplicity.  In addition, FlexFile offers
  62. data compression and encryption.
  63.  
  64. Saving Arrays
  65.  
  66. One of FlexFile's most powerful features is its ability to save and
  67. retrieve multi-dimensional arrays.  To understand why, consider the simple
  68. example of storing telephone numbers in a customer file.  Most businesses
  69. require several numbers: voice lines, fax lines, data lines, car phone
  70. lines and others.  However, the developer must make a decision to either
  71. limit the number of fields in the customer file or build a related DBF file
  72. with an index. With FlexFile, however, an array of telephone numbers can be
  73. saved to one field in your DBF.  Those customers who require many telephone
  74. lines do not have an imposed limit and those customers who have fewer lines
  75. do not waste any disk space.
  76.  
  77. Compression/Encryption
  78.  
  79. FlexFile's data compression has great advantages over standard compression
  80. utilities. First, FlexFile's compression occurs on a field-by-field basis.
  81. While the file always remains compressed, each field is un-compressed only
  82. as it is brought into memory. Second, FlexFile was designed to work from
  83. within Clipper and, lets face it, even Clipper 5.0 doesn't give us lots of
  84. extra memory to work with.  FlexFile requires less than 6K bytes of memory.
  85. Most compression techniques require substantially more. As an added
  86. benefit, FlexFile's compression also acts as encryption.  As is typical of
  87. the entire FlexFile library, the speed of the compression is outstanding.
  88.  
  89.  
  90. FlexFile on a Network
  91.  
  92. FlexFile typically requires no special network considerations beyond
  93. Clipper's RLOCK().  If you acquire an RLOCK() on a record in a DBF file
  94. that has a pointer-field, no other user will have WRITE access to that
  95. record.  Behind the scenes, FlexFile will lock and unlock its own internal
  96. tables automatically requiring no programmer intervention.
  97.  
  98. Multiple DBV files
  99.  
  100. The use of FlexFile's Variable Length Field (VLF) files was designed to
  101. parallel the use of DBF type files.  Specifically, the system is made up of
  102. work areas that are used to manage the VLF files in exactly the same manner
  103. as Clipper uses work areas to manage DBF files.
  104.  
  105. For example, you can V_SELECT(1) and then V_USE() a file in area one, and
  106. then V_SELECT(0) the next available work area and V_USE() another file
  107. there.  It should be noted that FlexFile's work areas are mutually
  108. exclusive from Clippers DBF work areas.
  109.  
  110. FlexFile alone
  111.  
  112. FlexFile can also be used without the help of a DBF.  This feature is
  113. particularly helpful when your application first starts up.  At this point
  114. you usually face the problem of gathering system information: Color
  115. schemes, users network rights, communication ports, screen size settings,
  116. default directories, ..., the list could go on and on. None of this
  117. information goes well in a DBF file because it is non-repetitive in both
  118. type and length.  So, let FlexFile keep it in an array (Clipper 5.0 multi-
  119. dimensional arrays are excellent for this).
  120.  
  121.  
  122. FlexFile and Graphics
  123.  
  124. FlexFile can save any binary data including graphics images. Therefore, it
  125. works well with graphics packages. To understand this advantage, consider a
  126. prison management system that required a picture of each inmate.  You could
  127. have a DBF record for each inmate and one of its fields could be called
  128. <mug_shot>.  Currently, most graphics packages require that each image be
  129. stored in a separate DOS file.  With FlexFile, however, the images can all
  130. be stored in one file.
  131.  
  132.  
  133.